let Main = () => import("@/views/Main");

export default [
  {
    meta: { title: "home", icon: "House" },
    path: "",
    component: Main,
    name: "home",
    children: [
      {
        component: () => import("@/views/Home"), //减少数据不必要的获取
        name: "homepage",
        path: "homepage",
        meta: { title: "home", icon: "House" },
      },
    ],
  },
  {
    meta: { title: "yunying.yunyingmanage", icon: "Histogram" },
    path: "yunyingmanage",
    name: "yunyingmanage",
    component: Main,
    children: [
      {
        meta: { title: "yunying.ordermanage" },
        component: () => import("@/views/yunyingmanage/OrderManage"),
        name: "ordermanage",
        path: "ordermanage",
      },
      {
        meta: { title: "yunying.commentmanage" },
        component: () => import("@/views/yunyingmanage/CommentManage"),
        name: "commentmanage",
        path: "commentmanage",
      },
      {
        meta: { title: "yunying.freightmanage" },
        component: () => import("@/views/yunyingmanage/FreightManage"),
        name: "freightmanage",
        path: "freightmanage",
      },
    ],
  },
  {
    meta: { title: "product.productmanage", icon: "ShoppingCart" },
    path: "productmanage",
    name: "productmanage",
    component: Main,
    children: [
      {
        meta: { title: "product.productlist" },
        component: () => import("@/views/productmanage/ProductList"),
        name: "productlist",
        path: "productlist",
      },
      {
        meta: { title: "product.tuangou" },
        component: () => import("@/views/productmanage/TuanGou"),
        name: "tuangou",
        path: "tuangou",
      },
      {
        meta: { title: "product.categorymanage" },
        component: () => import("@/views/productmanage/CategoryManage"),
        name: "categorymanage",
        path: "categorymanage",
      },
      {
        meta: { title: "product.createproduct", show: false, keepAlive: true },
        component: () => import("@/views/productmanage/CreateProduct"),
        name: "create",
        path: "create",
      },
      {
        meta: { title: "product.editproduct", show: false },
        component: () => import("@/views/productmanage/EditProduct"),
        name: "edit",
        path: "edit/:id",
        props: true,
      },
    ],
  },
  {
    meta: { title: "tuiguan.tuiguanmanage", icon: "Management" },
    path: "tuiguanmanage",
    name: "tuiguanmanage",
    component: Main,
    children: [
      {
        meta: { title: "tuiguan.advertisingmanage" },
        component: () => import("@/views/tuiguanmanage/AdvertisingManage"),
        name: "advertisingmanage",
        path: "advertisingmanage",
      },
      {
        meta: { title: "tuiguan.couponmanage" },
        component: () => import("@/views/tuiguanmanage/CouponManage"),
        name: "couponmanage",
        path: "couponmanage",
      },
    ],
  },
  {
    meta: { title: "user.usermanage", icon: "User" },
    path: "usermanage",
    name: "usermanage",
    component: Main,
    children: [
      {
        meta: { title: "user.membermanage" },
        component: () => import("@/views/usermanage/MemberManage"),
        name: "membermanage",
        path: "membermanage",
      },
      {
        meta: { title: "user.addressmanage" },
        component: () => import("@/views/usermanage/AddressManage"),
        name: "addressmanage",
        path: "addressmanage",
      },
    ],
  },
  {
    meta: { title: "system.systemmanage", icon: "Setting" },
    path: "systemmanage",
    name: "systemmanage",
    component: Main,
    children: [
      {
        meta: { title: "system.configmanage" },
        component: () => import("@/views/systemmanage/SystemConfig"),
        name: "configmanage",
        path: "configmanage",
      },
      {
        meta: { title: "system.admin" },
        component: () => import("@/views/systemmanage/Administrator"),
        name: "admin",
        path: "admin",
      },
      {
        meta: { title: "system.operationlog" },
        component: () => import("@/views/systemmanage/OperationLog"),
        name: "operationlog",
        path: "operationlog",
      },
      {
        meta: { title: "system.rolemanage" },
        component: () => import("@/views/systemmanage/RoleManage"),
        name: "rolemanage",
        path: "rolemanage",
      },
    ],
  },
];
